<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta property="og:image" content="<?=X3::app()->baseUrl?>/images/logo.png" />
<link href="/css/style.css" type="text/css" rel="stylesheet" />
<title><?=X3::app()->name?></title>
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <style>
        .body .main h1 {
            background:url(<?=X3::app()->theme['header']?>) no-repeat center bottom;
        }
    </style>
</head>
<body itemscope itemtype="http://schema.org/WebPage" <?=X3::user()->isGuest()?'class="unauthorized"':''?>  style="background: url(<?=X3::app()->theme['back']?>)">
    <?if(X3::user()->isAdmin()):?>
        <div class="global-menu-handle">
            <div class="handle-menu-admin" id="edit-link" title="Редактировать"><img src="/images/edit-icon.png" alt="Edit" /></div>
            <div class="handle-menu-admin" id="delete-link" title="Удалить"><img src="/images/delete-icon.png" alt="Edit" /></div>
        </div>
    <?endif;?>
    <div class="main-block <?=X3::app()->module->controller->id." ".X3::app()->module->controller->action?>">
        <div class="c-column left" style="background-image: url(<?=X3::app()->theme['columntile']?>)">
        <div class="c-column right" style="background-image: url(<?=X3::app()->theme['columntile']?>)">
        <div class="center">
            <div class="header"><header>
                    <img src="<?=X3::app()->theme['mainheader']?>"  />
            </header></div>
            <div class="body">
                <div class="left_block">
                <?=X3_Widget::run('@layouts:menu.php')?>
                <?=X3_Widget::run('@views:_widgets:gallery.php')?>
                <?=X3_Widget::run('@views:_widgets:login.php')?>
                </div>
                <div class="main" style="background:url(<?=X3::app()->theme['cover']?>);">
                    <?if(X3::app()->theme['decor']):?>
                    <div class="left-crnr">&nbsp;</div>
                    <div class="ll-crnr">&nbsp;</div>
                    <div class="right-crnr">&nbsp;</div>
                    <div class="lr-crnr">&nbsp;</div>
                    <?endif;?>
                    <div <?if(!X3::app()->theme['decor']):?>style="background:none;"<?endif;?> class="main-01">
                        <?if(X3::user()->isAdmin()):?>
                        <div class="admin-page-menu">
                            <?if(X3::app()->page_id>0):?>
                            <a class="adm-edit" title="Редактировать страницу" href="/page/add/id/<?=X3::app()->page_id?>"><img src="/images/edit-icon.png" alt="Edit" /></a>
                            <a class="adm-edit" title="История" href="/page/history/id/<?=X3::app()->page_id?>"><img src="/images/history-icon.png" alt="History" /></a>
                            <?endif;?>
                        </div>
                        <?endif;?>
                        <?=$content?>
                    </div>
                </div>
                <div class="clear"><!----></div>
            </div>
            <div class="footer">
                <footer>
                    <?=X3_Widget::run('@layouts:footer.php',array('main'=>isset($main)));?>
                </footer>
            </div>
        </div>
    </div>
    </div>
    </div>
    <script type="text/javascript" src="/js/jquery.js"></script>
    <?if(X3::user()->isAdmin()):?>
    <link href="http://code.jquery.com/ui/1.10.0/themes/cupertino/jquery-ui.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
    <?endif;?>
    <script type="text/javascript" src="/js/jquery.fcselect.js"></script>
    <script type="text/javascript" src="/js/jquery.fctabs.js"></script>
    <script type="text/javascript" src="/js/placeholder.js"></script>
    <script type="text/javascript" src="/js/wnd.js"></script>
    <script type="text/javascript">
    String.prototype.repeat = function( num ){return new Array( num + 1 ).join( this );}    
    </script>
<?if(!isset($_GET['x3_load_frame'])):?>
    <?if(X3::user()->isAdmin()):?>
        <script type="text/javascript" src="/js/admin.js"></script>
        <script type="text/javascript" src="/js/ckeditor.4/ckeditor.js"></script>
        <?include("js/sfbrowser/connectors/php/init.php");?>
    <?endif;?>
        
    <script type="text/javascript" src="/js/soundmanager2-jsmin.js"></script>
    <script type="text/javascript" src="/js/davidsbuendler.js<?=  filemtime('js/davidsbuendler.js')?>"></script>
<?endif;?>
</body>
</html>